//
//  ViewController.m
//  MyBlock
//
//  Created by 黄世光 on 15/11/16.
//  Copyright © 2015年 SHG. All rights reserved.
//

#import "ViewController.h"
#import "AddFile.h"
@interface ViewController ()
{
    NSInteger a ;
    NSInteger b ;
}
@property(nonatomic, strong)AddFile *addFile;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.addFile = [[AddFile alloc]init];
    a = 1;
    b = 10000;
    [self.addFile addCount:a other:b completion:^(NSInteger c) {
        NSLog(@"回到主线程结果%ld",c);
    }];
    NSLog(@"主线程跳过耗时操作先执行%ld",a+b);
    while (a < 10000000) {
        a++;
    }
    NSLog(@"%ld",1);
    NSLog(@"%ld",1);
    NSLog(@"%ld",a);
    NSLog(@"%ld",a);
    NSLog(@"%ld",a);
    NSLog(@"%ld",a);
    NSLog(@"%ld",a);
    NSLog(@"%ld",a);
    NSLog(@"%ld",a);
    NSLog(@"%ld",a);
    NSLog(@"%ld",a);
    NSLog(@"%ld",a);
    NSLog(@"%ld",a);
    NSLog(@"%ld",a);
}

@end
